import req from '../utils/request'
import * as URL from '../constans/api'
// 获取登录数据
export  function getLogin(data) {
    return req({
        url: URL.LOGIN,
        method: 'POST',
        data,
    })
       .then((res) => {
      const token = res.data.data.token
      localStorage.setItem('token', `Bearer ${token}`);
      return res;
    })
        .catch(err => err)
}
